home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / WMS.CAB / server_diag.asp < prev    next >
Encoding:
Text File  |  2003-02-21  |  34.1 KB  |  880 lines

  1. ∩╗┐<%@ Language=VBScript CODEPAGE=65001 %>
  2. <!--#include file="include/wmsConstants.inc"-->
  3. <!--#include file="include/wmsLocStrings.inc"-->
  4. <!--#include file="include/wmsCommon.inc"-->
  5. <!--#include file="include/wmsHeader.inc"-->
  6. <!--#include file="include/wmsRefresh.inc"-->
  7. <!--#include file="include/wmsServerHash.inc"-->
  8. <!--#include file="include/wmsconnect.inc"-->
  9. <!--#include file="include/wmsError.inc"-->
  10. <!--#include file="include/wmsToolbar.inc"-->
  11. <!--#include file="include/wmsHelp.inc"-->
  12. <!--#include file="include/wmsPageBanner.inc"-->
  13. <%
  14. '+-------------------------------------------------------------------------
  15. '
  16. '  Microsoft Windows Media
  17. '  Copyright (C) Microsoft Corporation. All rights reserved.
  18. '
  19. '  File:       Server_Diag.asp
  20. '
  21. '  Contents:
  22. '
  23. '--------------------------------------------------------------------------
  24.  
  25. ConnectToServer
  26. BeginErrorHandling
  27.  
  28. if( WMS_SERVICE_STARTED <> g_dwConnectionFailureCode ) then
  29.     Response.Redirect( "include/server_stopped.asp?server=" & qs("server") )
  30. end if
  31.  
  32. Dim objDiag
  33. Dim dwNumMessages
  34. Dim bDisplayLimitHits
  35. Dim bDisplayServerWarnings
  36. Dim bDisplayServerErrors
  37. Dim bDisplayPluginWarnings
  38. Dim bDisplayPluginErrors
  39. Dim strTrimmedOp
  40. Dim bDriveUpdateToTreeView
  41. Dim dwNumErrorsToStore
  42.  
  43. dwTabIndex = 1
  44. dwNumMessages = 0
  45.  
  46. bDisplayLimitHits = FALSE
  47. bDisplayPluginWarnings = FALSE
  48. bDisplayPluginErrors = FALSE
  49. bDisplayServerWarnings = FALSE
  50. bDisplayServerErrors = FALSE
  51.  
  52. dwNumErrorsToStore = g_objServer.Limits.DiagnosticEvents
  53.  
  54. on error resume next
  55.  
  56. if( 0 < Len( trim( qs("NumEntries") ) ) ) then
  57.     dwNewNum = CDbl( trim( qs("NumEntries") ) )
  58.     if( dwNumErrorsToStore <> dwNewNum ) then
  59.         g_objServer.Limits.DiagnosticEvents = dwNewNum
  60.         if( ErrorDetected( "NumErrors" ) ) then
  61.             dwNumErrorsToStore = dwNewNum
  62.             Session( "PageReloadedToDisplayError" ) = 1
  63.         else
  64.             dwNumErrorsToStore = g_objServer.Limits.DiagnosticEvents
  65.         end if
  66.     end if
  67. end if
  68.  
  69. dwNumErrorsToStore 
  70.  
  71. strTrimmedOp = trim( qs( "op" ) )
  72. if( 0 < len( strTrimmedOp ) ) then
  73.  
  74.     Dim szExtraArgs
  75.     szExtraArgs = ""
  76.  
  77.     if( 0 = StrComp( strTrimmedOp, "clear", vbTextCompare ) ) then
  78.         set objDiagEvents = g_objServer.DiagnosticEvents
  79.         objDiagEvents.RemoveAll
  80.         szExtraArgs = "&updateTree=1"
  81.  
  82.     elseif( 0 = StrComp( strTrimmedOp, "LimitHits", vbTextCompare ) ) then
  83.         if( "on" = qs("value") ) then
  84.             Session( "CBTroubleshootingLimitHits" ) = TRUE
  85.         else
  86.             Session( "CBTroubleshootingLimitHits" ) = FALSE
  87.         end if
  88.  
  89.     elseif( 0 = StrComp( strTrimmedOp, "PluginWarnings", vbTextCompare ) ) then
  90.  
  91.         if( "on" = qs("value") ) then     
  92.             Session( "CBTroubleshootingPluginWarnings" ) = TRUE
  93.         else
  94.             Session( "CBTroubleshootingPluginWarnings" ) = FALSE   
  95.         end if
  96.         
  97.     elseif( 0 = StrComp( strTrimmedOp, "PluginErrors", vbTextCompare ) ) then
  98.  
  99.         if( "on" = qs("value") ) then     
  100.             Session( "CBTroubleshootingPluginErrors" ) = TRUE
  101.         else
  102.             Session( "CBTroubleshootingPluginErrors" ) = FALSE   
  103.         end if
  104.  
  105.     elseif( 0 = StrComp( strTrimmedOp, "ServerWarnings", vbTextCompare ) ) then
  106.  
  107.         if( "on" = qs("value") ) then     
  108.             Session( "CBTroubleshootingServerWarnings" ) = TRUE
  109.         else
  110.             Session( "CBTroubleshootingServerWarnings" ) = FALSE   
  111.         end if
  112.         
  113.     elseif( 0 = StrComp( strTrimmedOp, "ServerErrors", vbTextCompare ) ) then
  114.  
  115.         if( "on" = qs("value") ) then     
  116.             Session( "CBTroubleshootingServerErrors" ) = TRUE
  117.         else
  118.             Session( "CBTroubleshootingServerErrors" ) = FALSE   
  119.         end if
  120.  
  121.     end if
  122.     Response.Redirect( "server_diag.asp?server=" & g_strQueryStringServer & szExtraArgs )
  123.     Response.Flush
  124.     Response.End
  125.     err.clear
  126.     
  127. end if
  128.  
  129. bDisplayLimitHits = Session( "CBTroubleshootingLimitHits" )
  130. bDisplayPluginWarnings = Session( "CBTroubleshootingPluginWarnings" )
  131. bDisplayPluginErrors = Session( "CBTroubleshootingPluginErrors" )
  132. bDisplayServerWarnings = Session( "CBTroubleshootingServerWarnings" )
  133. bDisplayServerErrors = Session( "CBTroubleshootingServerErrors" )
  134.  
  135. bDriveUpdateToTreeView = CBool( 0 < Len( qs("updateTree") ) )
  136. Set objDiag = g_objServer.DiagnosticEvents
  137.  
  138.  
  139. '/////////////////////////////////////////////////
  140. Sub GetErrDescription( byRef objErr, byVal errType, byRef strErrorDescription, byRef strErrorAltText )
  141.     on error resume next
  142.     
  143.     Dim strErrName
  144.     Dim strErrAdditionalInfo
  145.     
  146.     strErrName = objErr.Name
  147.     strErrAdditionalInfo = objErr.AdditionalInfo
  148.     
  149.     strErrorDescription = Server.HTMLEncode( strErrName ) & " " & Server.HTMLEncode( EventString( errType ) ) & "<br>" & strErrAdditionalInfo
  150.     strErrorAltText = strErrName
  151.     if( 0 < Len( strErrorAltText ) ) then
  152.         strErrorAltText = strErrorAltText & " - "
  153.     end if
  154.     strErrorAltText = strErrorAltText & Server.HTMLEncode( EventString( errType ) )
  155.     if( 0 < Len( strErrAdditionalInfo ) ) then
  156.         strErrorAltText = strErrorAltText & " - " & strErrAdditionalInfo
  157.     end if
  158. End Sub
  159.  
  160. '/////////////////////////////////////////////////
  161. Function AcceptEventType( dwEvent )
  162.     if( WMS_DIAGNOSTIC_EVENT_LIMIT_HIT = dwEvent ) then
  163.         AcceptEventType = bDisplayLimitHits
  164.     elseif( WMS_DIAGNOSTIC_EVENT_PLUGIN_EVENT_LOG_ERROR = dwEvent ) then
  165.         AcceptEventType = bDisplayPluginErrors
  166.     elseif( WMS_DIAGNOSTIC_EVENT_PLUGIN_EVENT_LOG_WARNING = dwEvent ) then
  167.         AcceptEventType = bDisplayPluginWarnings
  168.     elseif( WMS_DIAGNOSTIC_EVENT_SERVER_EVENT_LOG_ERROR = dwEvent ) then
  169.         AcceptEventType = bDisplayServerErrors
  170.     elseif( WMS_DIAGNOSTIC_EVENT_SERVER_EVENT_LOG_WARNING = dwEvent ) then
  171.         AcceptEventType = bDisplayServerWarnings
  172.     else
  173.         AcceptEventType = TRUE
  174.     end if
  175. End Function
  176.  
  177.  
  178. '///////////////////////////////////////////////////////////////
  179. Function EventString( errType )
  180.     if( WMS_DIAGNOSTIC_EVENT_LIMIT_HIT = errType ) then
  181.         EventString = L_LIMITEXCEEDED_TEXT
  182.     elseif ( WMS_DIAGNOSTIC_EVENT_PLUGIN_EVENT_LOG_ERROR = errType ) then
  183.         EventString = L_PLUGINERROR_TEXT
  184.     elseif ( WMS_DIAGNOSTIC_EVENT_PLUGIN_EVENT_LOG_WARNING = errType ) then
  185.         EventString = L_PLUGINWARNING_TEXT
  186.     elseif ( WMS_DIAGNOSTIC_EVENT_SERVER_EVENT_LOG_ERROR = errType ) then
  187.         EventString = L_SRVLOGERROR_TEXT
  188.     elseif ( WMS_DIAGNOSTIC_EVENT_SERVER_EVENT_LOG_WARNING = errType ) then
  189.         EventString = L_SRVLOGWRN_TEXT
  190.     else
  191.         EventString = ""
  192.     end if
  193. End Function
  194.  
  195.  
  196. '////////////////////////////////////////////////////////////////
  197. Function AtLeastOneError()
  198.     AtLeastOneError = FALSE
  199.     dwNumMessages = objDiag.Count
  200.     i = 0
  201.     dwNumMessagesDisplayed = 0
  202.  
  203.     i = 0
  204.     while ( i < dwNumMessages )
  205.         set objMessage = objDiag.Item( i )
  206.         errType = objMessage.Type
  207.         if( AcceptEventType( errType ) ) then
  208.             if ( WMS_DIAGNOSTIC_EVENT_PLUGIN_EVENT_LOG_ERROR = errType ) then
  209.                 AtLeastOneError = TRUE
  210.                 Exit Function
  211.             elseif ( WMS_DIAGNOSTIC_EVENT_SERVER_EVENT_LOG_ERROR = errType ) then
  212.                 AtLeastOneError = TRUE
  213.                 Exit Function
  214.             end if
  215.         end if
  216.         i = i + 1
  217.     wend
  218. End Function
  219.  
  220.  
  221. '////////////////////////////////////////////////////////////////
  222. Function CreateTabTitle( strServerName )
  223.     Dim strTemplate    
  224.     strTemplate = Server.HTMLEncode( L_TROUBLESHOOTINGTITLE_TEXT )
  225.     CreateTabTitle = Replace( strTemplate, "___", Server.HTMLEncode( strServerName ), 1 )
  226. End Function
  227.  
  228. WriteHTMLHeader( g_strDecodedServerName ) 
  229. WriteRefreshMetaTag
  230. %>
  231. <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>">
  232. <%
  233. %>
  234. <script language="JavaScript" src="include/WMSCommon.js"></script>
  235. <script language="javascript">
  236. <!--
  237. /*@cc_on @*/
  238. <% WriteCommonJSUtils %>
  239.  
  240. ///////////////////////////////////////////////////////////////////////
  241. function PrintLocalizedTimestamp( dwUTCDate )
  242. {
  243.     <% jsTRY %>
  244.     var dateTimeUTC;
  245.     dateTimeUTC = new Date( dwUTCDate ); 
  246.     document.write( dateTimeUTC.toLocaleString() );
  247.     <% jsCATCH %>
  248. }
  249.  
  250. ///////////////////////////////////////////////////////////////////////
  251. function PrintLocalizedDate( dwUTCDate )
  252. {
  253.     <% jsTRY %>
  254.     var dateTimeUTC;
  255.     var szLocDate;
  256.     dateTimeUTC = new Date( dwUTCDate );
  257. /*@if (@_jscript_version >= 5.5)
  258.     szLocDate = dateTimeUTC.toLocaleDateString(); 
  259.    @else @*/
  260.     szLocDate = dateTimeUTC.toLocaleString(); 
  261. /*@end @*/
  262.     document.write( szLocDate );
  263.     <% jsCATCH %>
  264. }
  265.  
  266. ///////////////////////////////////////////////////////////////////////
  267. function PrintLocalizedTime( dwUTCDate )
  268. {
  269.     <% jsTRY %>
  270.     var dateTimeUTC;
  271.     var szLocTime;
  272.     dateTimeUTC = new Date( dwUTCDate ); 
  273. /*@if (@_jscript_version >= 5.5)
  274.     szLocTime = dateTimeUTC.toLocaleTimeString(); 
  275.    @else @*/
  276.     szLocTime = dateTimeUTC.toLocaleString();
  277. /*@end @*/
  278.     document.write( szLocTime );
  279.     <% jsCATCH %>
  280. }
  281.  
  282. var g_bWarnedUser = false;
  283.  
  284. ///////////////////////////////////////////////////////////////////////
  285. function ValidateInput()
  286. {
  287.     <% jsTRY %>
  288.         FilterNumEntries();
  289.         
  290.         if( document.mainForm.ApplyNumEntries.disabled )
  291.         {
  292.             event.cancelBubble=1;
  293.             return false;
  294.         }
  295.     <% jsCATCH %>
  296. }
  297.  
  298. ////////////////////////////////////////////////////////////////
  299. function FilterNumEntries()
  300. {
  301.     <% jsTRY %>
  302.         var szVal = document.forms.mainForm.NumEntries.value;
  303.         if( isNaN( szVal ) || ( 2000 < szVal ) )
  304.         {
  305.             document.forms.mainForm.ApplyNumEntries.disabled = true;
  306.             document.forms.mainForm.NumEntries.style.color = "#ff0000";
  307.         }
  308.         else
  309.         {
  310.             if( 100 > szVal )
  311.             {
  312.                 document.forms.mainForm.ApplyNumEntries.disabled = true;
  313.                 document.forms.mainForm.NumEntries.style.color = "#ff0000";
  314.                 if( ! g_bWarnedUser )
  315.                 {
  316.                     g_bWarnedUser = true;
  317.                     window.alert( "<%= RemoveDangerousCharacters( L_INVALIDNUMDIAGEVENTS_TEXT ) %>" );
  318.                 }
  319.             }
  320.             else
  321.             {
  322.                 document.forms.mainForm.ApplyNumEntries.disabled = false;
  323.                 document.forms.mainForm.NumEntries.style.color = "#000000";
  324.             }
  325.         }
  326.     <% jsCATCH %>
  327. }
  328.  
  329. ////////////////////////////////////////////////////////////////
  330. function SubmitNumEntries()
  331. {
  332.     <% jsTRY %>
  333.         var dwNumEntries = 0;
  334.         dwNumEntries = document.forms.mainForm.NumEntries.value;
  335.         if( dwNumEntries >= 100 )
  336.         {
  337.             document.location = "server_diag.asp?server=<%= g_strQueryStringServer %>&NumEntries=" + dwNumEntries;
  338.         }
  339.     <% jsCATCH %>
  340.  
  341. ////////////////////////////////////////////////////////////////
  342. function ClearAll()
  343. {
  344.     <% jsTRY %>
  345.     document.location = "server_diag.asp?server=<%= g_strQueryStringServer %>&op=clear";
  346.     <% jsCATCH %>
  347.  
  348. ////////////////////////////////////////////////////////////////
  349. function ShowLimitHits( bSimulateClick )
  350. {
  351.     <% jsTRY %>
  352.         var szCheckedValue;
  353.         
  354.         if( bSimulateClick )
  355.         {
  356.             document.forms.mainForm.LimitHits.checked = ! document.forms.mainForm.LimitHits.checked;
  357.         }
  358.         
  359.         if( document.forms.mainForm.LimitHits.checked )
  360.         {
  361.             szCheckedValue = "on";
  362.         }
  363.         else
  364.         {
  365.             szCheckedValue = "off";
  366.         }
  367.         
  368.         document.location = "server_diag.asp?server=<%= g_strQueryStringServer %>&op=LimitHits&value=" + szCheckedValue;
  369.     <% jsCATCH %>
  370. }
  371.  
  372. ////////////////////////////////////////////////////////////////
  373. function ShowPluginWarnings( bSimulateClick )
  374. {
  375.     <% jsTRY %>
  376.         var szCheckedValue;
  377.  
  378.         if( bSimulateClick )
  379.         {
  380.             document.forms.mainForm.PluginWarnings.checked = ! document.forms.mainForm.PluginWarnings.checked;
  381.         }
  382.         
  383.         if( document.forms.mainForm.PluginWarnings.checked )
  384.         {
  385.             szCheckedValue = "on";
  386.         }
  387.         else
  388.         {
  389.             szCheckedValue = "off";
  390.         }
  391.         
  392.         document.location = "server_diag.asp?server=<%= g_strQueryStringServer %>&op=PluginWarnings&value=" + szCheckedValue;
  393.     <% jsCATCH %>
  394. }
  395.  
  396. ////////////////////////////////////////////////////////////////
  397. function ShowPluginErrors( bSimulateClick )
  398. {
  399.     <% jsTRY %>
  400.         var szCheckedValue;
  401.  
  402.         if( bSimulateClick )
  403.         {
  404.             document.forms.mainForm.PluginErrors.checked = ! document.forms.mainForm.PluginErrors.checked;
  405.         }
  406.         
  407.         if( document.forms.mainForm.PluginErrors.checked )
  408.         {
  409.             szCheckedValue = "on";
  410.         }
  411.         else
  412.         {
  413.             szCheckedValue = "off";
  414.         }
  415.         
  416.         document.location = "server_diag.asp?server=<%= g_strQueryStringServer %>&op=PluginErrors&value=" + szCheckedValue;
  417.     <% jsCATCH %>
  418. }
  419.  
  420. ////////////////////////////////////////////////////////////////
  421. function ShowServerWarnings( bSimulateClick )
  422. {
  423.     <% jsTRY %>
  424.         var szCheckedValue;
  425.  
  426.         if( bSimulateClick )
  427.         {
  428.             document.forms.mainForm.ServerWarnings.checked = ! document.forms.mainForm.ServerWarnings.checked;
  429.         }
  430.         
  431.         if( document.forms.mainForm.ServerWarnings.checked )
  432.         {
  433.             szCheckedValue = "on";
  434.         }
  435.         else
  436.         {
  437.             szCheckedValue = "off";
  438.         }
  439.         
  440.         document.location = "server_diag.asp?server=<%= g_strQueryStringServer %>&op=ServerWarnings&value=" + szCheckedValue;
  441.     <% jsCATCH %>
  442. }
  443.  
  444. ////////////////////////////////////////////////////////////////
  445. function ShowServerErrors( bSimulateClick )
  446. {
  447.     <% jsTRY %>
  448.         var szCheckedValue;
  449.  
  450.         if( bSimulateClick )
  451.         {
  452.             document.forms.mainForm.ServerErrors.checked = ! document.forms.mainForm.ServerErrors.checked;
  453.         }
  454.         
  455.         if( document.forms.mainForm.ServerErrors.checked )
  456.         {
  457.             szCheckedValue = "on";
  458.         }
  459.         else
  460.         {
  461.             szCheckedValue = "off";
  462.         }
  463.         
  464.         document.location = "server_diag.asp?server=<%= g_strQueryStringServer %>&op=ServerErrors&value=" + szCheckedValue;
  465.     <% jsCATCH %>
  466. }
  467. <% if brMSIE = g_dwBrowserType then %>
  468. function HilightCurrentNode()
  469. {
  470.     <% jsTRY %>
  471.     <% if( 0 < Len( qs("bUpdateTree") ) ) then %>
  472.         return;
  473.     <% else %>
  474.         var childFrame;
  475.         var framesetHeader;
  476.  
  477.         if( window.parent && window.parent.parent )
  478.         {
  479.             framesetHeader = window.parent.parent;
  480.             if( ! framesetHeader.IsTreeReady() )
  481.             {
  482.                 setTimeout( "HilightCurrentNode();", 1000, "JavaScript" );
  483.                 return;
  484.             }
  485.         }
  486.  
  487.         if( window.parent && window.parent.frames && window.parent.frames[ "treeFrames" ] && window.parent.frames[ "treeFrames" ].frames )
  488.         {
  489.             childFrame = window.parent.frames[ "treeFrames" ].frames[ "frameTreeCode" ];
  490.         }
  491.  
  492.         if( childFrame )
  493.         {
  494.             if( childFrame.Initialized() )
  495.             {
  496.                 childFrame.SetSelectedNode( "diag" );
  497.             }
  498.             else
  499.             {
  500.                 setTimeout( "HilightCurrentNode();", 1000, "JavaScript" );
  501.             }
  502.         }
  503.     <% end if %>
  504.     <% jsCATCH %>
  505. }
  506. <% end if %>
  507.  
  508. //////////////////////////////////////////////////////////////////////////
  509. function Initialize()
  510. {
  511.     <% jsTRY %>
  512. <% if brMSIE = g_dwBrowserType then %>
  513.     setTimeout( "HilightCurrentNode();", 50, "JavaScript" );
  514. <% end if %>
  515.     <% jsCATCH %>
  516. }
  517. -->
  518. </script>
  519. </head>
  520. <body width="100%" bgcolor="<%= colorTabLight %>" topmargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginwidth=0 marginheight=0 onLoad="JavaScript:<% if bDriveUpdateToTreeView then %>UpdateTreeView();<% end if %>Initialize();" oncontextmenu="JavaScript:event.cancelBubble=true;return false;">
  521. <!-- START BANNER -->
  522. <table valign="top" width="100%" height="85" cellspacing="0" cellpadding="0" border="0" class="bannerName" <% if brMSIE <> g_dwBrowserType then %>bgproperties="fixed" bgcolor="#FFFFFF" background="img/gradient_tabview.png"<% end if %>>
  523. <% if brMSIE = g_dwBrowserType then %><img height="85" width="100%" src="img/gradient_tabview.png" style="position:absolute;top=0;left=0;z-index=-1"><% end if %>
  524. <tr>
  525.     <td width="100%">
  526.         <table valign="top" width="100%" hspace="0" vspace="0" cellspacing="4" cellpadding="1" border="0" STYLE="BORDER-COLLAPSE:collapse" margin-top="0" margin-bottom="0">
  527.         <tr>
  528.             <td width="4">
  529.                  
  530.             </td>
  531.             <td valign="middle" align="left" width="32">
  532.                 <img src="img/trouble<% if AtLeastOneError then %>Checked<% end if %>_icon32.gif" border=0 height=32 width=32>
  533.             </td>
  534.             <td width="4">
  535.                  
  536.             </td>
  537.             <td align="left" width="100%">
  538.                 <table width="100%" cellspacing="0" cellpadding="0" border="0">
  539.                 <tr>
  540.                     <% 'server name %>
  541.                         <td valign="bottom" align="left">
  542.                         <span class="bannerName">
  543.                             <%
  544.                                 strTabTitle = CreateTabTitle( g_strServerName )
  545.                                 Response.Write( strTabTitle )
  546.                             %>
  547.                         </span>
  548.                     </td>
  549.                     <td valign="top" align="right">
  550.                          
  551.                     </td>
  552.                 </tr>
  553.                 <tr>
  554.                     <% 'server status %>
  555.                     <td valign="top" align="left">
  556.                         <span>
  557.                             <%= Server.HTMLEncode( L_TROUBLESHOOTSTATUS_TEXT ) & " <b>" & objDiag.Count & "</b>" %>
  558.                         </span>
  559.                     </td>
  560.                 </tr>
  561.                 </table>
  562.             </td>
  563.         </tr>
  564.         </table>
  565.     </td>
  566. </tr>
  567. </table><%
  568. if FALSE = g_bSecureConnection then %>
  569. <table cellspacing=0 cellpadding=0 border=0>
  570.     <tr>
  571.         <script language="JavaScript">
  572.             ShowHideSecureWarning( "img/Not_secure_32.gif" );
  573.         </script>
  574.     </tr>
  575. </table>
  576. <% end if
  577. %><br>
  578. <table width=100% cellspacing=5 cellpadding=0 border=0>
  579. <tr>
  580.     <td>
  581.         <table width=100% cellspacing=0 cellpadding=0 border=0>
  582.         <tr>
  583.             <td>
  584.                 <div class="helptext"><%= Server.HTMLEncode( L_TROUBLESHOOTHELP_TEXT ) %></div>
  585.                 <p>
  586.             </td>
  587.         </tr>
  588.         </table>
  589.     </td>
  590. </tr>
  591. <tr>
  592.     <td>
  593.         <table width=100% cellspacing=0 cellpadding=0 border=1 >
  594.         <tr>
  595.             <td>
  596.                 <table width=100% cellspacing=0 cellpadding=1 border=1 bordercolor="F2F2F2" class="small">
  597.                     <tr class="colheader">
  598.                         <td >
  599.                             <div class="colheader" nowrap><center><%= Server.HTMLEncode( L_TYPE_TEXT ) %></center></div>
  600.                         </td>
  601.                         <td >
  602.                             <div class="colheader" nowrap><center><%= Server.HTMLEncode( L_DATE_TEXT ) %></center></div>
  603.                         </td><% if brMSIE = g_dwBrowserType then %>
  604.                         <td >
  605.                             <div class="colheader" nowrap><center><%= Server.HTMLEncode( L_TIME_TEXT ) %></center></div>
  606.                         </td><% end if %>
  607.                         <td >
  608.                             <div class="colheader" nowrap><center><%= Server.HTMLEncode( L_LOCATION_TEXT ) %></center></div>
  609.                         </td>
  610.                         <td >
  611.                             <div class="colheader" nowrap><center><%= Server.HTMLEncode( L_NUMBER_TEXT ) %></center></div>
  612.                         </td>
  613.                         <td>
  614.                             <div class="colheader" nowrap><center><%= Server.HTMLEncode( L_DESCRIPTION_TEXT ) %></center></div>
  615.                         </td>
  616.                     </tr>
  617.                     <% 
  618.                         Dim i
  619.                         Dim objMessage
  620.                         Dim errType
  621.                         Dim strErrorDescription
  622.                         Dim strErrorAltText
  623.                         Dim strPPName
  624.                         Dim dwNumMessagesDisplayed
  625.                         Dim strImgPath
  626.                         Dim strText
  627.                         Dim strImgAltText
  628.                         dwNumMessages = objDiag.Count
  629.                         i = 0
  630.                         dwNumMessagesDisplayed = 0
  631.  
  632.                         i = 0
  633.                         While ( i < dwNumMessages )
  634.                             i = i + 1
  635.                             
  636.                             strErrorDescription = ""
  637.                             strErrorAltText = ""
  638.                             
  639.                             set objMessage = objDiag.Item( i - 1 )
  640.                             errType = objMessage.Type
  641.                             if( AcceptEventType( errType ) ) then
  642.                                 strImgAltText = EventString( errType )
  643.                                 if( WMS_DIAGNOSTIC_EVENT_LIMIT_HIT = errType ) then
  644.                                     strImgPath = "img/MsgBoxAlert_Warning_16.gif"
  645.                                     strText = Server.HTMLEncode( L_LIMIT_TEXT )
  646.                                 elseif ( WMS_DIAGNOSTIC_EVENT_PLUGIN_EVENT_LOG_ERROR = errType ) then
  647.                                     strImgPath = "img/MsgBoxAlert_Critical_16.gif"
  648.                                     strText = Server.HTMLEncode( L_ERROR_TEXT )
  649.                                 elseif ( WMS_DIAGNOSTIC_EVENT_SERVER_EVENT_LOG_ERROR = errType ) then
  650.                                     strImgPath = "img/MsgBoxAlert_Critical_16.gif"
  651.                                     strText = Server.HTMLEncode( L_ERROR_TEXT )
  652.                                 elseif ( WMS_DIAGNOSTIC_EVENT_PLUGIN_EVENT_LOG_WARNING = errType ) then
  653.                                     strImgPath = "img/MsgBoxAlert_Warning_16.gif"
  654.                                     strText = Server.HTMLEncode( L_WARNING_TEXT )
  655.                                 elseif ( WMS_DIAGNOSTIC_EVENT_SERVER_EVENT_LOG_WARNING = errType ) then
  656.                                     strImgPath = "img/MsgBoxAlert_Warning_16.gif"
  657.                                     strText = Server.HTMLEncode( L_WARNING_TEXT )
  658.                                 end if
  659.                     %>
  660.                     <tr>
  661.                         <td align="middle" valign="middle">
  662.                             <div class="smallest">
  663.                                 <table cellspacing="1" cellpadding="1" border="0">
  664.                                 <tr>
  665.                                     <td valign="absmiddle" width="16" align="left">
  666.                                         <img src="<%= strImgPath %>" height="16" width="16" border="0" title="<%= Server.HTMLEncode( strImgAltText ) %>" ID="<%= strImgAltText %>" alt="<%= Server.HTMLEncode( strImgAltText ) %>">
  667.                                     </td>
  668.                                     <td valign="absmiddle" class="smallest" align="left" width="100%">
  669.                                         <%= strText %>
  670.                                     </td>
  671.                                 </tr>
  672.                                 </table>
  673.                             </div>
  674.                         </td>
  675.                         <% if brMSIE <> g_dwBrowserType then %>
  676.                         <td>
  677.                             <div class="smallest" nowrap>
  678.                                 <script language="JavaScript">PrintLocalizedTimestamp( "<%= FormatDateAsUTC( objMessage.Time ) %>" );</script>
  679.                            </div>
  680.                         </td>
  681.                         <% else %>
  682.                         <td>
  683.                             <div class="smallest">
  684.                                 <script language="JavaScript">PrintLocalizedDate( "<%= FormatDateAsUTC( objMessage.Time ) %>" );</script>
  685.                            </div>
  686.                         </td>
  687.                         <td>
  688.                             <div class="smallest" nowrap>
  689.                                 <script language="JavaScript">PrintLocalizedTime( "<%= FormatDateAsUTC( objMessage.Time ) %>" );</script>
  690.                             </div>
  691.                         </td>
  692.                         <% end if %>
  693.                         <td>
  694.                             <div class="smallest">
  695.                                 <%
  696.                                     strPPName = objMessage.PublishingPointName
  697.                                     if( 0 = Len( strPPName ) ) then
  698.                                         Response.Write( Server.HTMLEncode( g_strDecodedServerName ) )
  699.                                     else
  700.                                         Response.Write Server.HTMLEncode( ConvertPPName( strPPName, 0 ) )
  701.                                     end if
  702.                                 %>
  703.                             </div>
  704.                         </td>
  705.                         <td>
  706.                             <div class="smallest">
  707.                                 <center>
  708.                                 <%= Server.HTMLEncode( objMessage.NumberOfOccurrences ) %>
  709.                                 </center>
  710.                             </div>
  711.                         </td>
  712.                         <td><% GetErrDescription objMessage, errType, strErrorDescription, strErrorAltText %>
  713.                             <div class="smallest" title="<%= strErrorAltText %>">
  714.                                 <%= strErrorDescription %>
  715.                             </div>
  716.                         </td>
  717.                     </tr>
  718.                     <% 
  719.                         end if
  720.                         objMessage = NULL
  721.                     Wend
  722.                     
  723.                     if( 0 = dwNumMessages ) then
  724.                         %>
  725.                     <tr>
  726.                         <td colspan=6>
  727.                              
  728.                         </td>
  729.                     </tr>
  730.                         <%
  731.                     end if
  732.                     %>
  733.                 </table>
  734.             </td>
  735.         </tr>
  736.         </table>
  737.     </td>
  738. </tr>
  739.  
  740. <tr>
  741.     <td>
  742.         <p>
  743.     </td>
  744. </tr>
  745. <tr>
  746.     <td>
  747.         <table cellspacing=0 cellpadding=0 border=0>
  748.         <tr>
  749.             <td>
  750.                 <div class="subheader">
  751.                 <%= Server.HTMLEncode( L_FILTEREVENTS_TEXT ) %>
  752.                 </div>
  753.                 <table width="100%" bgcolor="lightgrey">
  754.                     <tr>
  755.                         <td>
  756.                             <span class="defaultcursor">
  757.                             <form name="mainForm" method="get" onsubmit="JavaScript:return( ValidateInput() );">
  758.                                 <input type="hidden" name="server" value="<%= g_strQueryStringServer %>">
  759.                                 <table cellpadding=3 cellspacing=3 border=0>
  760.                                 <tr>
  761.                                     <td valign="top">
  762.                                         <input tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> type="checkbox" name="LimitHits" <% if bDisplayLimitHits then Response.Write( "checked" ) end if %>
  763.                                         onClick="Javascript:ShowLimitHits( false )" id="limithits">
  764.                                         <label for="limithits" class="handcursor" title="<%= Server.HTMLEncode( L_DISPLIMITHITS_TEXT ) %>"> <%= Server.HTMLEncode( L_DISPLIMITHITS_TEXT ) %></label><br>
  765.                                         <input tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> type="checkbox" name="ServerWarnings" <% if bDisplayServerWarnings then Response.Write( "checked" ) end if %>
  766.                                         onClick="Javascript:ShowServerWarnings( false )" id="serverwarn">
  767.                                         <label for="serverwarn" class="handcursor" title="<%= Server.HTMLEncode( L_DISPSRVLOGWRNS_TEXT ) %>"> <%= Server.HTMLEncode( L_DISPSRVLOGWRNS_TEXT ) %></label><br>
  768.                                         <input tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> type="checkbox" name="ServerErrors" <% if bDisplayServerErrors then Response.Write( "checked" ) end if %>
  769.                                         onClick="Javascript:ShowServerErrors( false )" id="servererr">
  770.                                         <label for="servererr" class="handcursor" title="<%= Server.HTMLEncode( L_DISPSRVLOGERRORS_TEXT ) %>"> <%= Server.HTMLEncode( L_DISPSRVLOGERRORS_TEXT ) %></label><br>
  771.                                         <input tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> type="checkbox" name="PluginWarnings" <% if bDisplayPluginWarnings then Response.Write( "checked" ) end if %>
  772.                                         onClick="Javascript:ShowPluginWarnings( false )" id="plwarn">
  773.                                         <label for="plwarn" class="handcursor" title="<%= Server.HTMLEncode( L_DISPPLUGINWARNINGS_TEXT ) %>"> <%= Server.HTMLEncode( L_DISPPLUGINWARNINGS_TEXT ) %></label><br>
  774.                                         <input tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> type="checkbox" name="PluginErrors" <% if bDisplayPluginErrors then Response.Write( "checked" ) end if %>
  775.                                         onClick="Javascript:ShowPluginErrors( false )" id="plerr">
  776.                                         <label for="plerr" class="handcursor" title="<%= Server.HTMLEncode( L_DISPPLUGINERRORS_TEXT ) %>"> <%= Server.HTMLEncode( L_DISPPLUGINERRORS_TEXT ) %></label><br>
  777.                                     </td>
  778.                                     <td> </td>
  779.                                     <td valign="top">
  780.                                         <table cellpadding=0 cellspacing=3 border=0 width=100%>
  781.                                         <tr>
  782.                                             <td>
  783.                                                 <% RenderWithErrorCheck Server.HTMLEncode( L_NUMTROUBLEENTRIES_TEXT ), "NumErrors" %>
  784.                                             </td>
  785.                                         </tr>
  786.                                         <tr>
  787.                                             <td align="right">
  788.                                         <input 
  789.                                             type="text" 
  790.                                             name="NumEntries" 
  791.                                             id="NumEntries"
  792.                                             title="<%= Server.HTMLEncode( L_NUMTROUBLEENTRIES_TEXT ) %>"
  793.                                             value="<%= dwNumErrorsToStore %>"
  794.                                             size="4"
  795.                                             onKeyUp="JavaScript:FilterNumEntries();" 
  796.                                             onKeyDown="JavaScript:FilterNumEntries();" 
  797.                                             onChange="JavaScript:FilterNumEntries();"
  798.                                             onPaste="JavaScript:FilterNumEntries();"
  799.                                         >
  800.                                         <input 
  801.                                             type="button" 
  802.                                             id="ApplyNumEntries"
  803.                                             name="ApplyNumEntries"                              
  804.                                             value="<%= Server.HTMLEncode( L_APPLYBUTTON_TEXT ) %>" 
  805.                                             onClick="Javascript:SubmitNumEntries()"
  806.                                             disabled
  807.                                         >
  808.                                             </td>
  809.                                         </tr>
  810.                                         </table>
  811.                                     </td>
  812.                                 </tr>
  813.                                 </table>
  814.                             </form>
  815.                             </span>
  816.                         </td>
  817.                     </tr>
  818.                 </table>
  819.             </td>
  820.         </tr>
  821.         </table>
  822.     </td>
  823. </tr>
  824. <tr>
  825.     <td>
  826.         <%
  827.         ToolbarButtonText ( 0 ) = L_CLEARLIST_TEXT
  828.         if( 0 <> dwNumMessages ) then
  829.             ToolbarButtonImage( 0 ) = IMAGE_CLEARLIST
  830.             ToolbarButtonLink ( 0 ) = "Javascript:ClearAll()"
  831.         else
  832.             ToolbarButtonImage( 0 ) = IMAGE_CLEARLISTG
  833.             ToolbarButtonLink ( 0 ) = ""
  834.         end if
  835.         ToolbarButtonAltText( 0 ) = L_CLEARLISTTT_TEXT
  836.         dwLastToolbarIndex = 0
  837.  
  838. if( Session( "ShowServerList" ) ) then
  839.         dwLastToolbarIndex = dwLastToolbarIndex + 1
  840.         ToolbarButtonText ( dwLastToolbarIndex ) = L_BUTTONRETURNTOSERVERLIST_TEXT
  841.         ToolbarButtonImage( dwLastToolbarIndex ) = IMAGE_SERVERLIST
  842.         ToolbarButtonLink ( dwLastToolbarIndex ) = SERVERSLIST_PATH
  843.         ToolbarButtonAltText( dwLastToolbarIndex ) = L_RETURNTOSL_TEXT
  844. end if
  845.  
  846.         dwLastToolbarIndex = dwLastToolbarIndex + 1
  847.         ToolbarButtonText ( dwLastToolbarIndex ) = L_BUTTONHELP_TEXT
  848.         ToolbarButtonImage( dwLastToolbarIndex ) = IMAGE_HELP
  849.         ToolbarButtonLink ( dwLastToolbarIndex ) = HELPTOKEN
  850.         ToolbarButtonAltText( dwLastToolbarIndex ) = L_HELPALT_TEXT
  851.         ToolbarHelpURL = H_SERVERDIAGHELPTOPIC
  852.         ToolbarNesting = H_SERVERLEVEL
  853.  
  854.         %>
  855. <% DrawToolbar FALSE, ( dwLastToolbarIndex + 1 ) %>
  856.  
  857. </table>
  858. <%
  859.     AlertUserWithPopupErrorDialog
  860. '    OnErrorGoBack 
  861.     
  862.     DrawRefreshControl FALSE
  863.     DrawCopyrightInfo
  864. %>
  865. </body>
  866. </html>
  867. <%
  868. LatchCurrentPage "server_diag.asp", qs
  869. EndErrorHandling( "server_diag.asp" )
  870.  
  871. on error resume next
  872.  
  873. Set q = Nothing
  874. Set objDiag = Nothing
  875.  
  876. WMSServerHashASPCleanup
  877. WMSConnectASPCleanup
  878. %>